package week2;
import java.util.Arrays;
import java.util.Scanner;
public class Timu1 {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);//ctrl+shift+o
	
	String choice = sc.nextLine();
	
	int i=0;
	switch (choice) {
	case "fib":
		int n = sc.nextInt();
		fib(n);
		break;
	case "sort":
		String num=sc.nextLine();
		String st =num.split(" ");
		int []a=null;
		a=convertToIntDigits(st);
		Arrays.sort(a);
		System.out.println(Arrays.toString(a));
		break;
	case "search":
		Arrays.sort(a);
		int n=Integer.parseInt(sc.nextLine());
		int x=Arrays.binarySearch(a, n);
		if(x<0)
			System.out.println(-1);
		else
			System.out.println(x);
		break;
	case "getBirthDate":
		int b=Integer.parseInt(sc.nextLine());
		for(i=0;i<x;i++)
		{
		String id =sc.nextLine();
		System.out.println(id.substring(6,10)+id.substring(10,12)+id.substring(12,14));
		}
		break;
	default:
		System.out.println("exit");
		break;
	}

}

private static void fib(int n) {
	System.out.println("1 1 2");
	
}
private static int[] convertToIntDigits(String[] strDigits) {
	int[] digits=new int[strDigits.length];
	for(int i=0;i<strDigits.length;i++)
	{
		digits[i]=Integer.parseInt(strDigits[i]);
	}
	return digits;
	
}}
